#include <iostream>
#include <vector>
#include <cstring>
#include <algorithm>
using namespace std;

vector<int> dist;
int ret=0;

int main()
{
	int n;
	cin>>n;
	int sum=0;
	for(int i=1;i<=n;i+=2)
	{
		int a,b;
		cin>>a>>b;
		dist.push_back(a-b);
		sum+=a-b;
		
	}
	sort(dist.begin(),dist.end());
	for(int i=0;i<dist.size();i++)
	{
		if(abs(sum-dist[i]-dist[i])<abs(sum))
		{
			ret++;
			sum=sum-dist[i]-dist[i];
		}
	}
	cout<<ret<<endl;
	return 0;
}
